$bool = Pipe ( <path>, "<$variable>" )
Invokes console based application and populates the result into a variable array.
Parameters
<path> Path of the console based application.
<$variable> Variable array into which the outcome is populated.
Return Value
Returns 1 if successful, else returns 0.
Example
:MAIN
answer 1
;........
;........
$stat = Pipe("c:\Windows\system32\ipconfig.exe","$file")
if $stat == 1
$index = reversefind($file.line.8," ")
if $index != -1
$localip = mid($file.line.8,$index)
display $localip
endif
endif
;........
;........
hangup
goto MAIN
- Here, ipconfig.exe is invoked to retrieve the local IP address. The outcome written into the console is directed to a variable array viz., $file.